import { Injectable } from '@angular/core';
import { FrameContext } from '@farris/devkit';
import { CommandService, RouterService, FormMessageService, BeActionService } from '@farris/command-services';
import { MessagerService } from '@farris/ui-messager';
import { BefRepository, ResponseInfo } from '@farris/bef';
import { EMPTY, of } from 'rxjs';

@Injectable()
export class XjgzfxjCardFrmControllerService {
 constructor(
    private frameContext: FrameContext,
    private beActionService: BeActionService,
    private commandService: CommandService,
    private messageService: FormMessageService,
  ) {}

  /**
   * 附件扩展按钮点击事件
   * @remarks 
   * @returns 
   */
  attachmentFileNameInputAppendClickEvent(): any {
    let eventParam = this['context'].eventParam;
    let clickid = eventParam.event.target.getAttribute('id');
    if (clickid === "cardforntview") {
      return this.commandService.execute('basicformPreviewByAttachmentInfoFieldPath1', 'basic-form-component');
    }
    else if (clickid === "cardforntdownload") {
      return this.commandService.execute('basicformDownload1', 'basic-form-component');
    }
  }

  }

